--[[
####################################################
Eva Framework
simonw last modify on 2008.3.27
Copyright GNU GPL

http://wiki.cwowaddon.com/EVA
http://bbs.cwowaddon.com/thread-585-1-1.html
####################################################
]]

local EvaMajor, EvaMinor = "Eva", "beta3"
local Eva = _G[EvaMajor]

local print = function (msg)
	DEFAULT_CHAT_FRAME:AddMessage(tostring(msg or "nil"))
end

local function Init()
	Eva = {
		Name = "Eva Framework",
		Version = EvaMinor,
		Lib = {}
	}
	_G[EvaMajor] = Eva

	print("Eva Framework "..EvaMinor.." loaded.")
end

if (Eva) then
	if (Eva.Addon and Eva.Block) then
		print(string.format(
			"Eva Framework %s already exist. Not load another Eva Framework %s.",
			Eva.Version or "old version",
			EvaMinor)
		)
	else
		Init()
		error("A golbal var 'Eva' or 'EVA' conflict with Eva Framework.")
	end
else
	Init()
end

EVA = Eva